package com.ruoyi.lottery.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.lottery.mapper.TbLotteryMapper;
import com.ruoyi.lottery.domain.TbLottery;
import com.ruoyi.lottery.service.ITbLotteryService;

/**
 * 抽奖Service业务层处理
 * 
 * @author LiuWeiChen
 * @date 2025-08-01
 */
@Service
public class TbLotteryServiceImpl implements ITbLotteryService 
{
    @Autowired
    private TbLotteryMapper tbLotteryMapper;

    /**
     * 查询抽奖
     * 
     * @param lotteryId 抽奖主键
     * @return 抽奖
     */
    @Override
    public TbLottery selectTbLotteryByLotteryId(Long lotteryId)
    {
        return tbLotteryMapper.selectTbLotteryByLotteryId(lotteryId);
    }

    /**
     * 查询抽奖列表
     * 
     * @param tbLottery 抽奖
     * @return 抽奖
     */
    @Override
    public List<TbLottery> selectTbLotteryList(TbLottery tbLottery)
    {
        return tbLotteryMapper.selectTbLotteryList(tbLottery);
    }

    /**
     * 新增抽奖
     * 
     * @param tbLottery 抽奖
     * @return 结果
     */
    @Override
    public int insertTbLottery(TbLottery tbLottery)
    {
        return tbLotteryMapper.insertTbLottery(tbLottery);
    }

    /**
     * 修改抽奖
     * 
     * @param tbLottery 抽奖
     * @return 结果
     */
    @Override
    public int updateTbLottery(TbLottery tbLottery)
    {
        return tbLotteryMapper.updateTbLottery(tbLottery);
    }

    /**
     * 批量删除抽奖
     * 
     * @param lotteryIds 需要删除的抽奖主键
     * @return 结果
     */
    @Override
    public int deleteTbLotteryByLotteryIds(Long[] lotteryIds)
    {
        return tbLotteryMapper.deleteTbLotteryByLotteryIds(lotteryIds);
    }

    /**
     * 删除抽奖信息
     * 
     * @param lotteryId 抽奖主键
     * @return 结果
     */
    @Override
    public int deleteTbLotteryByLotteryId(Long lotteryId)
    {
        return tbLotteryMapper.deleteTbLotteryByLotteryId(lotteryId);
    }
}
